<template>
  <div class="order">
    <!-- 头部 -->
    <NavigationBar title="订单列表"></NavigationBar>
    <van-tabs v-model="active" type="card">
      <van-tab title="全部">
        <OrderList :type="0"></OrderList>
      </van-tab>
      <van-tab title="待付款">
        <OrderList :type="1"></OrderList>
      </van-tab>
      <van-tab title="待收货">
        <OrderList :type="2"></OrderList>
      </van-tab>
    </van-tabs>
  </div>
</template>

<script>
export default {
  name: "Order",
  data() {
    return {
      active: this.$route.params.type || 0
    }
  },
// 侦听器
  watch: {},
// 计算属性
  computed: {},
// 事件
  methods: {},
// 生命周期
  created() {
  },
  mounted() {
  }
}
</script>

<style lang="scss" scoped>
.order {
  width: 100%;

  ::v-deep.van-tabs__wrap {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 5%;
    background: #f5f5f5;
    display: flex;
    overflow: visible;
    position: fixed;
    top: 44px;
    height: 56px;
    z-index: 100;

    .van-tabs__nav--card {
      height: auto;
      border: 0;
    }

    .van-tabs__nav {
      overflow: visible;
      background-color: transparent;
      margin: 0;
    }

    .van-tab {
      display: flex;
      justify-content: center;
      align-items: center;
      width: 86px;
      height: 36px;
      overflow: hidden;
      box-sizing: border-box;
      border-radius: 20px;
      color: #9b9b9b;
      font-size: 18px;
      font-weight: 400;
      border: 0;
    }

    .van-tab--active {
      background-image: linear-gradient(90deg, #72b4fe, #3777f7);
      box-shadow: 0 5px 10px 0 rgb(0 0 0 / 10%);
      color: #fff;
    }
  }

  ::v-deep.van-tabs__content {
    margin-top: 56px;
  }
}
</style>